<table width="100%" border="0" cellpadding="0" cellspacing="0" background="/images/mainpage-sliced_16.jpg">
  <tr>
    <td width="20" height="40">&nbsp;</td>
    <td class="style5" style="border-right:solid 1px #FFFFFF;">Assign Resource To Project {<?php echo $sf_user->getAttribute('selectedProject')?>}</td>
  </tr>
</table>
<table>
  <tr>
    <td >
<select multiple id="select1" style="height:65px;width:120px;float:left;text-align: center;margin:10px" >  
<?php foreach ($resources as $resourceNotWorkingInSelectedProject): ?>  
  <option value="<?php echo $resourceNotWorkingInSelectedProject->getResourceid() ?>"><?php echo $resourceNotWorkingInSelectedProject->getName() ?></option>      
<?php endforeach; ?>
</select><br/>
<a href="<?php echo url_for('project/addresource') ?>" id="add" style="border:1px solid #aaa;text-decoration:none;background-color: #fafafa;color: #123456;margin: 2px;clear:both;margin:10px">add &gt;&gt;</a>    
    </td>
    <td >
<select multiple id="select2" style="height:65px;width:120px;text-align: center;margin:10px">
<?php  foreach ($projects as $assignedResource): ?> 
  <option value="<?php echo $assignedResource->getResourceid()."+" ?>"><?php echo $assignedResource->getName() ?></option>
<?php endforeach; ?>
</select> <br/> 
<a href="<?php echo url_for('project/assignresource') ?>" id="remove" style="border:1px solid #aaa;text-decoration: none;background-color: #fafafa;color: #123456;margin: 2px;clear:both;margin:10px">&lt;&lt; remove</a>    
    </td>
  </tr>
</table>

<!--input type="button" id="add" value="Add" /-->  


<!--input type="button" id="remove" value="Remove"/-->  

<script type="text/javascript">  
  $().ready(function() {  
   $('#add').click(function() {  
    return !$('#select1 option:selected').remove().appendTo('#select2');  
   });  
   $('#remove').click(function() {  
    return !$('#select2 option:selected').remove().appendTo('#select1');  
   });  
  });  
 </script>  
 